home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Presentations
/
Presentations ’92
/
PatchWorks Kit
/
<PatchWorks++>
/
VirtualWorld.h
< prev
Wrap
Text File
|
1992-04-27
|
922b
|
39 lines
/*
VirtualWorld.h
Interface to the Virtual world maintaining class.
by Patrick Beard.
©1990, 91, 92 by Patrick C. Beard. All rights reserved.
*/
#pragma once
#ifndef __VIRTUAL_WORLD__
#define __VIRTUAL_WORLD__
#include <Memory.h>
#include <stddef.h>
class VirtualWorld {
public:
VirtualWorld(Boolean worldFloats); // constructor sets up world.
~VirtualWorld(); // destructor destroys it.
// main functions, Enter sets A5 to point to our world.
void* Enter(); // go into our world.
void Leave(void* oldA5); // restore old world.
private:
Boolean itsFloating; // whether we have to call the vtable init.
char* itsWorld; // the storage for the virtual world.
long itsSize; // how big our globals are.
void* itsA5; // the computed value of A5 to use.
};
void* operator new(size_t n); // handle our own new & delete operators.
void operator delete(void* p);
#endif